package thread.java20230108;

import java.util.Date;

public class Demo44 {
    public static void main(String[] args) {
        MyThreadPool pool = new MyThreadPool(3);
        for (int i = 0; i < 10; i++) {
            pool.submit(() -> {
                System.out.println("hello" + new Date());
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            });
        }
    }
}
